package com.tsingteng.cosfun.ui.message.fans.model;


import com.tsingteng.cosfun.bean.FansNotificationBean;
import com.tsingteng.cosfun.bean.FollowBean;
import com.tsingteng.cosfun.callback.RxObserver;
import com.tsingteng.cosfun.common.Config;
import com.tsingteng.cosfun.http.RxSchedulers;
import com.tsingteng.cosfun.mvp.module.BaseModel;
/**
 * 粉丝列表网络请求层
 * 2018.8.14
 * 常胜
 * */
public class FansListModel extends BaseModel implements IFansListModel{

    @Override
    public void getFollowNotification(String id,RxObserver<FollowBean> callback) {
        doRxRequest().getFollowPerson(id).compose(RxSchedulers.io_main()).subscribe(callback);
    }

    @Override
    public void getNoFollowNotification(String id,RxObserver<FollowBean> callback) {
        doRxRequest().getNoFollow(id).compose(RxSchedulers.io_main()).subscribe(callback);
    }

    @Override
    public void getFansNotification(String type, int page,  RxObserver<FansNotificationBean> callback) {
        doRxRequest().getFansNotification(type,page, Config.PAGE_SIZE).compose(RxSchedulers.io_main()).subscribe(callback);
    }

    @Override
    public void getReadNotification(int maxid, RxObserver<Integer> rxObserver) {
        doRxRequest().getReadReslt("FANS",maxid).compose(RxSchedulers.io_main()).subscribe(rxObserver);
    }
}
